const Router = require('@koa/router')
const { page, exportExcel } = require('../controllers/history')
const router = new Router()

router.get('/all', async (ctx) => {
  ctx.body = '所有历史数据'
})

router.post('/page', page)

router.post('/export', exportExcel)

router.get('/:id', async (ctx) => {
  // ctx.body = `获取用户${ctx.params.id}的历史数据`
  ctx.body = {
    username: 'jxm',
    age: 28
  }
})

router.prefix('/history')
module.exports = router
